class CategorytsController < ApplicationController
  # GET /categoryts
  # GET /categoryts.xml
  def index
    @categoryts = Categoryt.find(:all)

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @categoryts }
    end
  end

  # GET /categoryts/1
  # GET /categoryts/1.xml
  def show
    @categoryt = Categoryt.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @categoryt }
    end
  end

  # GET /categoryts/new
  # GET /categoryts/new.xml
  def new
    @categoryt = Categoryt.new

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @categoryt }
    end
  end

  # GET /categoryts/1/edit
  def edit
    @categoryt = Categoryt.find(params[:id])
  end

  # POST /categoryts
  # POST /categoryts.xml
  def create
    @categoryt = Categoryt.new(params[:categoryt])

    respond_to do |format|
      if @categoryt.save
        flash[:notice] = 'Categoryt was successfully created.'
        format.html { redirect_to(@categoryt) }
        format.xml  { render :xml => @categoryt, :status => :created, :location => @categoryt }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @categoryt.errors, :status => :unprocessable_entity }
      end
    end
  end

  # PUT /categoryts/1
  # PUT /categoryts/1.xml
  def update
    @categoryt = Categoryt.find(params[:id])

    respond_to do |format|
      if @categoryt.update_attributes(params[:categoryt])
        flash[:notice] = 'Categoryt was successfully updated.'
        format.html { redirect_to(@categoryt) }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @categoryt.errors, :status => :unprocessable_entity }
      end
    end
  end

  # DELETE /categoryts/1
  # DELETE /categoryts/1.xml
  def destroy
    @categoryt = Categoryt.find(params[:id])
    @categoryt.destroy

    respond_to do |format|
      format.html { redirect_to(categoryts_url) }
      format.xml  { head :ok }
    end
  end
end
